<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

<portlet:defineObjects />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Solutions 
Description: A two-column, fixed-width design for 1024x768 screen resolutions.
Version    : 1.0
Released   : 20091102
-->

<script type="text/javascript" src="<%= response.encodeURL(request.getContextPath() + "/simpletreemenu.js") %>">
/***********************************************
* Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="<%= response.encodeURL(request.getContextPath() + "/style/simpletree.css") %>" />

<script type="text/javascript" src="<%= response.encodeURL(request.getContextPath() + "/calendarDateInput.js") %>">
/***********************************************
* Jason's Date Input Calendar- By Jason Moon http://calendar.moonscript.com/dateinput.cfm
* Script featured on and available at http://www.dynamicdrive.com
* Keep this notice intact for use.
***********************************************/
</script>
<link href="<%= response.encodeURL(request.getContextPath() + "/style/style.css") %>" rel="stylesheet" type="text/css" media="screen" />

<portlet:actionURL var="updateProject">
	<portlet:param name="action" value="actionProject"/>
</portlet:actionURL>
<form method="post" action="${updateProject}">
<table>

	<tr>	
		<td>
			<table border="1">
				<tr>
					<td><h2 class="title">Project  Information</h2></td>
				</tr>
					
				<tr>
					<td><em>General Information </em><p/></td>
				</tr>
				<tr>
					<td>
						<table border="1" width="100%">							
							<tr>
							  <td align="left" valign="bottom">&nbsp;Project Name</td>
							  <td align="left" valign="middle" colspan="3"><input type="text" name="textName" /></td>							  							 						  </tr><tr>
							  <td align="left" valign="bottom">&nbsp;Project's Description&nbsp;</td>
							  <td align="left" valign="middle" colspan="3"><textarea name="areaDescription"></textarea></td>							  							</tr>
							<tr>
							  <td align="left" valign="bottom">&nbsp;Company&nbsp;</td>
							  <td align="left" valign="middle">
								  <select name="selectCom">
									<option value="1">FPT Software</option>
									<option value="1">TMA</option>
								  </select>							  </td>							
							  <td colspan="2" align="left" valign="middle">Department
								  <select name="selectDepart" onchange="if(this.value=='Other'){
														this.form.otherDepart.style.visibility='visible';
														this.form.otherDepart.focus();}
												else{this.form.otherDepart.style.visibility='hidden';}">
									<option value="1">G33</option>
									<option value="1">G36</option>
									<option value="1">G6</option>
									<option value="1">RAI</option>
									<option value="Other">Other</option>
								</select>
							  <input name="otherDepart" type="text" style="visibility:hidden" />							  </td>  
						  </tr>
							<tr>
							  <td align="left" valign="middle" rowspan="2">&nbsp;Project's Period&nbsp;</td>
							  <td align="left" valign="bottom">From</td>
							  <td align="left" valign="middle" colspan="2">&nbsp;
							  
										<script>
											DateInput('periodFrom', true, 'DD/MM/YYYY');
										</script>
										<input type="hidden" name="textPeriodFrom">								  
							  </td>  							 
						  </tr>
						  <tr>
							  	<td align="left" valign="bottom">&nbsp;To&nbsp;</td>
						  		<td align="left" valign="middle" colspan="2">&nbsp;
										<script>
											DateInput('periodTo', true, 'DD/MM/YYYY');
										</script>				
										<input type="hidden" name="textPeriodTo">			  
								</td>
						  </tr>
						  <tr>
							  	<td align="left" valign="bottom">&nbsp;Size&nbsp;</td>
						  		<td colspan="3" align="left" valign="middle"><input type="text" name="textSize" /></td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom" colspan="4"><em>&nbsp;Technology Information&nbsp;</em></td>							  
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Language&nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectLang" rows="3"></textarea></td>
							  <td align="left" valign="bottom">								  
								  <select name="selectLang" 
								  		onchange="if(this.value=='Other'){
														this.form.otherLang.style.visibility='visible';
														this.form.otherLang.focus();}
												else{this.form.otherLang.style.visibility='hidden';}"
														>
                                    <option value="Java">Java</option>
                                    <option value="C++">C++</option>
                                    <option value="C#">C#</option>
                                    <option value="Delphi">Delphi</option>
                                    <option value="Other">Other</option>
                                  </select>
						    <input name="otherLang" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">					    
						    <input name="addLang" type="button" value="Add" 
								  			onclick="
													if(this.form.selectLang.value!='Other'){
														if(this.form.projectLang.value==''){
															this.form.projectLang.value = this.form.selectLang.value;
														} else{
															this.form.projectLang.value = this.form.projectLang.value+', '+this.form.selectLang.value;
														}
													}else{
														if(this.form.projectLang.value==''){
															this.form.projectLang.value = this.form.otherLang.value;
														} else{
															this.form.projectLang.value = this.form.projectLang.value+', '+this.form.otherLang.value;
														}
													}
													"/>								</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Type of Application &nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectApp" rows="3"></textarea></td>
							  <td align="left" valign="bottom">	
							  <select name="selectApp"
							  					onchange="if(this.value=='Other'){
																this.form.otherApp.style.visibility='visible';
																this.form.otherApp.focus();}
															else{this.form.otherApp.style.visibility='hidden';}"
									>
							    <option value="Web">Web Application</option>
							    <option value="Desktop">Desktop Application</option>
							    <option value="Mobile">Mobile Application</option>
							    <option value="Embedded">Embedded Application</option>
							    <option value="Other">Other Application</option>
                                </select>
						    <input name="otherApp" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">
						    <input name="addApp" type="button" value="Add" 
								  			onclick="
													if(this.form.selectApp.value!='Other'){
														if(this.form.projectApp.value==''){
															this.form.projectApp.value = this.form.selectApp.value;
														} else{
															this.form.projectApp.value = this.form.projectApp.value+', '+this.form.selectApp.value;
														}
													} else {
														if(this.form.projectApp.value==''){
															this.form.projectApp.value = this.form.otherApp.value;
														} else{
															this.form.projectApp.value = this.form.projectApp.value+', '+this.form.otherApp.value;
														}
													}
													"/>							</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Kind of Technology&nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectTech" rows="3"></textarea></td>
							  <td align="left" valign="bottom">
							  		<select name="selectTech" onchange="if(this.value=='Other'){
																this.form.otherTech.style.visibility='visible';
																this.form.otherTech.focus();}
															else{this.form.otherTech.style.visibility='hidden';}"
									>
							  		  <option value="J2EE">J2EE</option>
							  		  <option value="J2SE">J2SE</option>
							  		  <option value="Java Networking">Java Networking</option>
							  		  <option value="Java XML">Java XML</option>
							  		  <option value="EJB">EJB</option>
							  		  <option value="Servlet">Servlet</option>
							  		  <option value="Other">Other</option>
                              		</select>
							  		<input name="otherTech" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">
							<input name="addTech" type="button" value="Add" 
								  			onclick="
													if(this.form.selectTech.value!='Other'){
														if(this.form.projectTech.value==''){
															this.form.projectTech.value = this.form.selectTech.value;
														} else{
															this.form.projectTech.value = this.form.projectTech.value+', '+this.form.selectTech.value;
														}
													} else {
														if(this.form.projectTech.value==''){
															this.form.projectTech.value = this.form.otherTech.value;
														} else{
															this.form.projectTech.value = this.form.projectTech.value+', '+this.form.otherTech.value;
														}
													}
													"/>								</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Kind of Framework &nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectFw" rows="3"></textarea></td>
							  <td align="left" valign="bottom">
							  	  <select name="selectFw" onchange="if(this.value=='Other'){
																this.form.otherFw.style.visibility='visible';
																this.form.otherFw.focus();}
															else{this.form.otherFw.style.visibility='hidden';}"
									>
								    <option value="Struts">Struts</option>
								    <option value="Spring">Spring</option>
								    <option value="Hibernate">Hibernate</option>
								    <option value="Other">Other</option>
								  </select>
								  <input name="otherFw" type="text" style="visibility:hidden" />								  </td>
								<td align="left" valign="bottom">
							<input name="addFw" type="button" value="Add" 
								  			onclick="
													if(this.form.selectFw.value!='Other'){
														if(this.form.projectFw.value==''){
															this.form.projectFw.value = this.form.selectFw.value;
														} else{
															this.form.projectFw.value = this.form.projectFw.value+', '+this.form.selectFw.value;
														}
													} else {
														if(this.form.projectFw.value==''){
															this.form.projectFw.value = this.form.otherFw.value;
														} else{
															this.form.projectFw.value = this.form.projectFw.value+', '+this.form.otherFw.value;
														}
													}
													"/>							</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Kind of Database &nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectDb" rows="3"></textarea></td>
							  <td align="left" valign="bottom">
							  	  <select name="selectDb" onchange="if(this.value=='Other'){
																this.form.otherDb.style.visibility='visible';
																this.form.otherDb.focus();}
															else{this.form.otherDb.style.visibility='hidden';}"
									>
								    <option value="Oracle">Oracle</option>
								    <option value="MSSQL">MSSQL</option>
								    <option value="MySQL">MySQL</option>
								    <option value="Other">Other</option>
								  </select>
								  <input name="otherDb" type="text" style="visibility:hidden" />								  </td>
								<td align="left" valign="bottom">
							<input name="addDb" type="button" value="Add" 
								  			onclick="
													if(this.form.selectDb.value!='Other'){
														if(this.form.projectDb.value==''){
															this.form.projectDb.value = this.form.selectDb.value;
														} else{
															this.form.projectDb.value = this.form.projectDb.value+', '+this.form.selectDb.value;
														}
													} else {
														if(this.form.projectDb.value==''){
															this.form.projectDb.value = this.form.otherDb.value;
														} else{
															this.form.projectDb.value = this.form.projectDb.value+', '+this.form.otherDb.value;
														}
													}
													"/>							</td>
						  </tr>

						  <tr align="left" valign="bottom">
						  	  <td colspan="5">
						  	  	<input type="submit" name="submitUpdate" value="Update" 
						  	  				onclick="
							  	  					this.form.textPeriodFrom.value = this.form.periodFrom.value;
							  	  					this.form.textPeriodTo.value = this.form.periodTo.value;
							  	  					"/>
						  	  	<input type="button" name="Button2" value="Cancel" />
						  	  </td>
						  </tr>
				    </table>					</td>
				</tr>
			</table>			
		</td>
	</tr>
	<tr>
		<td colspan="2">
			&nbsp;</td>
	</tr>
</table>
</form>
